
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">批量处理</h4>
            </div>
            <div class="modal-body">
                <form name="form" novalidate>

                    <div class="form-group" ng-class="{'has-error':vm.p.showNoSelect,'has-success':!vm.p.showNoSelect}">
                        <p>0.开启工单，状态变成 待处理;</p>
                        <p>1.接收处理 或 放弃处理，状态变成 处理中 或 已废除;</p>
                        <p>2.处理完成即已解决， 状态变成 待验证;</p>
                        <p>3.验证通过，状态变成 已关闭;</p>
                        <p>工单终止状态：已关闭 或 已废除</p>

                        <label style="padding: 15px 0 5px">工单状态: </label>
                        <!--                            <input type="text" class="form-control" name="status" ng-model="vm.p.status"  />-->
                        <select ng-model="vm.p.status" ng-init="vm.p.status='opened'" class="form-control">
                            <!--                            下一步动作： 开启工单，状态变成 待处理-->
                            <option value="opened">待处理</option>
                            <!--                            下一步动作： 接收处理 或 放弃处理，状态变成 处理中 或 已废除-->
                            <option value="processing">处理中</option>
                            <!--                            下一步动作： 处理完成，即已解决， 状态变成 待验证-->
                            <option value="resolved">待验证</option>
                            <!--                            下一步动作： 验证通过，状态变成 已关闭-->
                            <option value="invalid">已废除</option>
<!--                            <option value="misreport">误报</option>-->
                            <option value="closed">已关闭</option>
                        </select>
                        <span ng-show="vm.p.showNoSelect" class="help-block" >请勾选工单后再进行批量处理</span>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" ng-class="{'disabled':loading}" ng-click="ok()" >确认</button>
            </div>
        </div>
    </div>
</div>

<!--导航栏-->
<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                                                                                    rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/onduty">首页</a>
                </li>
                <li class="#/star/onduty/ticket_list">工单中心</li>
            </ul>
        </div>
    </div>
</div>

<div style="padding: 0 10px 0; float:right;">
    <div style="text-align: right;font-size: 1.2rem; color: red;">请及时处理相关工单，具体可咨询：lixiyong01</div>
    <br />
</div>
<div class="col-sm-10 col-md-10" style="padding: 10px;">
    <form class="form-inline">
        <div class="btn-group" data-toggle="buttons">
            <label class="btn btn-default active" ng-click="toggleInterval('7d')">
                <input type="radio" value="7d" ng-model="vm.p.interval" ng-checked="true"> 近7天
            </label>
            <label class="btn btn-default" ng-click="toggleInterval('30d')">
                <input type="radio" value="30d" ng-model="vm.p.interval"> 近30天
            </label>
            <label class="btn btn-default" ng-click="toggleInterval('all')">
                <input type="radio" value="all" ng-model="vm.p.interval"> 全部
            </label>
        </div>
        <div style="padding-left: 20px;" class="form-group">
            <label>负责人：</label>
            <input type="text" class="form-control" id="ownerId" placeholder="请填写负责人oa" ng-model="vm.p.ownerId" />
        </div>

        <button id="refreshTable" type="button" class="btn btn-primary" ng-click="listTicket()">
            <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
        </button>
    </form>
</div>
<!--<form class="form-inline" role="form">-->

    <!--<div class="col-lg-3 pull-right">-->
        <!--<div class="input-group">-->
            <!--<div class="input-group-addon">集群</div>-->
            <!--<select class="form-control" ng-model="vm.cluster" ng-options="cluster.label for cluster in vm.type.items"  ng-change="vm.onSelected(vm.cluster.id)">-->
                <!--<option value="">&#45;&#45; 请选择集群 &#45;&#45;</option>-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
    <!--<div class="col-lg-3 pull-right">-->
        <!--<div class="input-group">-->
            <!--<div class="input-group-addon">类型</div>-->
            <!--<select class="form-control" ng-model="vm.type" ng-options="type.label for type in vm.types">-->
                <!--<option value="">&#45;&#45; 请选择类型 &#45;&#45;</option>-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
<!--</form>-->

<div class="container-fluid">
    <div style="margin: 10px">
        <div class="row">
            <div class="col-sm-12 col-md-12 main" style="float: right">
                <h3 class="sub-header" style="display:inline-block"> 工单列表 </h3>
                <div style="float:right;">
                    <a class="btn btn-primary btn-sm" href="#/star/onduty/ticket/add/0" role="button">新建工单</a>
                    <a class="btn btn-primary btn-sm" role="button" ng-click="toBatchDeal()">批量处理</a>
                </div>
                <table id="list_table" class="table table-condensed"
                       data-toolbar="#toolbar"
                       data-search="true"
                       data-show-toggle="true"
                       data-show-columns="true"
                       data-show-pagination-switch="true"
                       data-pagination="true"
                       data-search-align="left"
                       data-buttons-align="left"
                       data-toolbar-align="left"
                       data-side-pagination="client"
                       data-click-to-select="true">
                    <thead>
                    <tr>
                        <th data-field="state" data-checkbox="true"></th>
                        <th data-field="SerialNumber" data-sortable="true" data-formatter="serialFormatter">序号</th>
                        <th data-field="id" data-sortable="true" data-formatter="ticketIDOptFmt">操作</th>
                        <th data-field="location" data-sortable="true" >所属业务</th>
                        <th data-field="status" data-sortable="true" data-formatter="ticketStatusFmt">工单状态</th>
                        <th data-field="type" data-sortable="true" data-formatter="ticketTypeFmt">工单类型</th>
                        <th data-field="severity" data-sortable="true" data-formatter="severityFmt">紧急程度</th>
<!--                        <th data-field="eventId" data-sortable="true">事件ID</th>-->
                        <th data-field="ctiId" data-sortable="true" data-formatter="ctiIdFmt">CTI项</th>
                        <th data-field="subject" data-sortable="true">工单标题</th>
                        <th data-field="description" data-sortable="true" data-width="136px" data-formatter="descriptionFmt">工单详情（摘要）</th>
                        <th data-field="category" data-sortable="true">工单分类</th>
                        <th data-field="responser" data-sortable="true" >指派处理人</th>
                        <th data-field="dealUser" data-sortable="true" >当前处理人</th>
                        <th data-field="resolvegroupName" data-sortable="true" data-formatter="resolvegroupFmt">支持组</th>
<!--                        <th data-field="resolvegroupId" data-sortable="true">支持组id</th>-->
                        <th data-field="requester" data-sortable="true" data-formatter="requesterFmt">提交人</th>
                        <th data-field="isNotifyRg" data-sortable="true">通知组成员</th>
                        <th data-field="duration" data-sortable="true">处理时长（分钟）</th>
                        <th data-field="reportDate" data-sortable="true" data-formatter="hll2StdTimeFmt">上报时间</th>
                        <th data-field="updateTime" data-sortable="true">更新时间</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>
